<template>
  <div style="">
    <div class="data-count-data" v-for="(item,index) in datas">
      <div class="font-radius" :class="index==0?'red':index==1?'orange':index==2?'yellow':''">
        {{ index+1 }}
      </div>
      <div class="data-count-text">
        {{ item.title }}
      </div>
      <div class="data-count-Progress">
        <el-progress stroke-linecap="square" :stroke-width="10" :color="index==0?'#FF3535':index==1?'#FA8C16':index==2?'#FFC53D':'#4B6EEF'" :percentage="item.value"></el-progress>
      </div>
    </div>
  </div>
</template>

<script>

export default {
  name: 'importTop5',
  props: {
    datas: {
      type: Array,
      default() {
        return []
      }
    }
  }
}
</script>

<style lang="scss" scoped>
@mixin flex {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.data-count-data {
  padding: 10px;
  @include flex;

  .font-radius {
    display: inline-block;
    width: 18px;
    height: 18px;
    text-align: center;
    line-height: 18px;
    font-size: 12px;
    background: rgba(0, 0, 0, .25);
    color: #fff;
    border-radius: 50%;
  }

  .data-count-text {
    font-size: 14px;
    margin: 0 10px;
    width: 35%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .data-count-Progress {
    flex: 1
  }
}

.red {
  background: #FF3535 !important;
}

.orange {
  background: #FA8C16 !important;
}

.yellow {
  background: #FFC53D !important;
}
</style>
